namespace Crm.Domain.TestUtil.ObjectMothers
{
    /// <summary>
    /// This class is an OBJECT MOTHER and is responsible for creating suitably populated <see cref="Address"/> objects.
    /// </summary>
    /// <remarks>
    /// For more details on the OBJECT MOTHER pattern see 
    /// http://www.codeplex.com/domaindrivendesign/Wiki/View.aspx?title=Object%20Mother.
    /// </remarks>
    public static class AddressObjectMother
    {
        /// <summary>
        /// Creates an address where the city is <paramref name="city"/>.
        /// </summary>
        public static Address CreateWithCity(string city)
        {
            return new Address(AddressCommonTestValues.AddressLines, city, AddressCommonTestValues.RegionOrState,
                               AddressCommonTestValues.ZipOrPostCode);
        }

        /// <summary>
        /// Creates an address where the address lines are <paramref name="addressLines"/>.
        /// </summary>
        public static Address CreateWithAddressLines(string[] addressLines)
        {
            return new Address(addressLines, AddressCommonTestValues.City, AddressCommonTestValues.RegionOrState, 
                               AddressCommonTestValues.ZipOrPostCode);
        }

        /// <summary>
        /// Creates an address where the region or state is <paramref name="regionOrState"/>.
        /// </summary>
        public static Address CreateWithRegionOrState(string regionOrState)
        {
            return new Address(AddressCommonTestValues.AddressLines, AddressCommonTestValues.City, regionOrState,
                               AddressCommonTestValues.ZipOrPostCode);
        }
    }
}
